#计算1! + 2! +3! + …… + n!
# n = int(input('请输入一个正整数：'))
# j = 1
# sum = 0
# while j<=n:
#     factorResult = 1
#     i = 1
#     while i<=j:
#         factorResult*=i
#         i+=1
#     sum+=factorResult
#     j+=1
# print(f'sum = {sum}')

# #打印2、4、6、8、10
# for i in range(2,11,2):
#     print(i)


#打印10到1
# num = 10
# while num>=1:
#     print(num)
#     num-=1
# for i  in range(10,0,-1):
#     print(i)

#计算若干个数的平均值
# theSum = 0
# count = 0
# while True:
#     num = input("请输入一个数字（以分号结束）：")
#     if num == ';':
#         break
#     num = float(num)
#     theSum+=num
#     count += 1
# print(f"平均值为{theSum/count}")

#################################
def solution(r,h):
    S = 3.14 * r ** 2
    v = S * h
    return S,v
R = float(input('请输入圆柱体的半径：'))
H = float(input('请输入圆柱体的高：'))
s = solution(R,H)
print(f'面积为：{s[0]}')
print(f'体积为：{s[1]}')